package com.boang.time;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.Period;

/*
  @author: 13813
  @date: 2024/11/22 11:20
*/
public class PeriodDemo {
    public static void main(String[] args) {
        LocalDate start = LocalDate.now();

        LocalDate end = LocalDate.of(2038, 12, 25);

        int years = Period.between(start, end).getYears();
        System.out.println(years);

        int days = Period.between(start, end).getDays();
        System.out.println(days);
    }
}
